﻿using ClassLibrary1;
using Microsoft.AspNetCore.Mvc;

namespace AutoDependencyInjection.WebApi.Sample.Controllers
{
    [Route("api/[controller]")]
    [ApiController]
    public class TestController : ControllerBase
    {
        private readonly IEnumerable<ITestService> _testService;

        public TestController(IEnumerable<ITestService> testService)
        {
            _testService = testService;
        }

        [HttpGet]
        public void T()
        {
            _testService.ToList().ForEach(x => x.Run());
        }
    }
}